#include "starling_drv_util.h"

void htonsbuf(uint16_t* buf, int blen)
{
  int i, len = blen / 2;

  for (i = 0; i < len; ++i) {
    buf[i] = htons(buf[i]);
  }
}

void ntohsbuf(uint16_t* buf, int blen)
{
  int i, len = blen / 2;

  for (i = 0; i < len; ++i) {
    buf[i] = ntohs(buf[i]);
  }
}
